package com.huika.renrench.support.bean;

import java.io.Serializable;

import com.huika.lib.encrypt.RSAUtils;
import com.huika.renrench.http.JSONWrapAjaxParams;

public class UserModel implements Serializable {
	private static final long serialVersionUID = 1L;
	private String userId;// :用户ID
	private double amountTotal;// ：账户总资产
	private String realName;// ：真实姓名
	private String idCard;// ：身份证号码
	private String phone;// ：手机号码
	private int isSetPayPwd;// ：是否设置交易密码（0未设置1.已设置）
	private String account;// ：账号
	private String headImg;// ：头像
	private String bigImgUrl;// ：头像
	private String nickName;// : 昵称
	private double loanAmount;// ：借款总金额
	private double balance;// ：可用余额
	private String yearRate;// ：年化收益率
	private int userType;// :0.会员1.商家
	private int hasProject;// 0无项目;1有项目
	private String projectId;
	private String merchantId;
	private String shopId;
	private String aesKey;

	public UserModel(String userId, double amountTotal, String realName, String idCard, String phone, int isSetPayPwd, String account, String headImg, String bigImgUrl, String nickName,
			double loanAmount, double balance, String yearRate, int userType, int hasProject, String projectId, String merchantId, String shopId, String aesKey) {
		super();
		this.userId = userId;
		this.amountTotal = amountTotal;
		this.realName = realName;
		this.idCard = idCard;
		this.phone = phone;
		this.isSetPayPwd = isSetPayPwd;
		this.account = account;
		this.headImg = headImg;
		this.nickName = nickName;
		this.loanAmount = loanAmount;
		this.balance = balance;
		this.yearRate = yearRate;
		this.userType = userType;
		this.hasProject = hasProject;
		this.projectId = projectId;
		this.merchantId = merchantId;
		this.shopId = shopId;
		this.aesKey = aesKey;
		this.bigImgUrl = bigImgUrl;
	}

	public String getAesKey() throws Exception {
		return RSAUtils.decryptByPublicKey(aesKey,JSONWrapAjaxParams.PUBLIC_KEY_VALUE );
	}

	public String getBigImgUrl() {
		return bigImgUrl;
	}

	public void setBigImgUrl(String bigImgUrl) {
		this.bigImgUrl = bigImgUrl;
	}

	public void setAesKey(String aesKey) {
		this.aesKey = aesKey;
	}

	public String getShopId() {
		return shopId;
	}

	public void setShopId(String shopId) {
		this.shopId = shopId;
	}

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public UserModel() {
		super();
	}

	public int getHasProject() {
		return hasProject;
	}

	public void setHasProject(int hasProject) {
		this.hasProject = hasProject;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public double getAmountTotal() {
		return amountTotal;
	}

	public void setAmountTotal(double amountTotal) {
		this.amountTotal = amountTotal;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public int getIsSetPayPwd() {
		return isSetPayPwd;
	}

	public void setIsSetPayPwd(int isSetPayPwd) {
		this.isSetPayPwd = isSetPayPwd;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public double getLoanAmount() {
		return loanAmount;
	}

	public void setLoanAmount(double loanAmount) {
		this.loanAmount = loanAmount;
	}

	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}

	public String getYearRate() {
		return yearRate;
	}

	public void setYearRate(String yearRate) {
		this.yearRate = yearRate;
	}

	public int getUserType() {
		return userType;
	}

	public void setUserType(int userType) {
		this.userType = userType;
	}
}
